<?php

function Poly($points, $close = false, $style = '') {
    if ($style == 'F') {
        $op = 'f';
    } else if ($style == 'FD' || $style == 'DF') {
        $op = 'B';
    } else {
        $op = 'S';
    }
    $buffer = sprintf("%.2f %.2f m\n", $points[0][0], $this->h - $points[0][1]);
    //for($i = 1;$i <>h - $points[$i][1]);
/*}
 * 
 $buffer = sprintf("%.2f %.2f m\n", $points[0][0]*$this->k, ($this->h-$points[0][1])*$this->k);
for ($i=1; $i<count($points); $i++) {
$buffer = sprintf("%.2f %.2f l\n", $points[$i][0]*$this->k,($this->h-$points[$i][1])*$this->k);
}

//if ($close) {
 //   $buffer .= " h\n";
//}
$buffer .= " $op\n";
$this->_out($buffer);*/
}

require_once('../shared/lib/fpdf/fpdf.php');

$inch = 72;
$fpdf = new FPDF('L', 'pt', 'letter');
$fpdf->SetDrawColor(0xA4, 0x17, 0x17);
$fpdf->SetFillColor(0x63, 0x8F, 0xC9);
$fpdf->SetFont('Helvetica', '', 12);
$fpdf->AddPage();

$fpdf->Text($inch, $inch, "Test of the Poly(...) method:");
$fpdf->SetXY($inch, 4 * $inch);

// Build up a set of points
$points = array();
$points[] = array($inch, 4 * $inch);
//for($x = 1;
//$x <>Poly($points, true, 'FD');


$fpdf->Output();
